package com.song.book.utils;

import com.song.book.vo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalException {

    @ExceptionHandler(value = UsernameNotFoundException.class)
    public R usernameNotFoundException(UsernameNotFoundException e){
        return R.error(20001,e.getMessage());
    }


}